package cn.zymall.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`admin`")
public class Admin extends BaseEntity implements Serializable {
    /**
     * 用户编号
     */
    @TableId(value = "ADMIN_ID", type = IdType.AUTO)
    private Integer adminId;

    /**
     * 用户账号
     */
    @TableField(value = "ADMIN_ACCOUNT")
    private String adminAccount;

    /**
     * 用户密码
     */
    @TableField(value = "ADMIN_PASSWORD")
    private String adminPassword;

    /**
     * 用户角色编号
     */
    @TableField(value = "ADMIN_ROLE_ID")
    private Integer adminRoleId;

    /**
     * 用户头像
     */
    @TableField(value = "ADMIN_HEAD_PROTRAIT")
    private String adminHeadProtrait;

    /**
     * 手机号
     */
    @TableField(value = "ADMIN_PHONE_NUMBER")
    private String adminPhoneNumber;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "ADMIN_CREATION_TIME")
    private Date adminCreationTime;

    /**
     * 创建者编号
     */
    @TableField(value = "CREATOR_ID")
    private Integer creatorId;

    /**
     * 状态
     */
    @TableField(value = "ADMIN_STATUS")
    private Byte adminStatus;

    /**
     * 更新人
     */
    @TableField(value = "UPDATE_BY")
    private Integer updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "UPDATE_TIME")
    private Date updateTime;

    @TableField(exist = false)
    private Role role;


    private static final long serialVersionUID = 1L;

    public static final String COL_ADMIN_ID = "ADMIN_ID";

    public static final String COL_ADMIN_ACCOUNT = "ADMIN_ACCOUNT";

    public static final String COL_ADMIN_PASSWORD = "ADMIN_PASSWORD";

    public static final String COL_ADMIN_ROLE_ID = "ADMIN_ROLE_ID";

    public static final String COL_ADMIN_HEAD_PROTRAIT = "ADMIN_HEAD_PROTRAIT";

    public static final String COL_ADMIN_PHONE_NUMBER = "ADMIN_PHONE_NUMBER";

    public static final String COL_ADMIN_CREATION_TIME = "ADMIN_CREATION_TIME";

    public static final String COL_CREATOR_ID = "CREATOR_ID";

    public static final String COL_ADMIN_STATUS = "ADMIN_STATUS";

    public static final String COL_UPDATE_BY = "UPDATE_BY";

    public static final String COL_UPDATE_TIME = "UPDATE_TIME";
}
